/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller;

import entity.KelolaTJ;
import entity.TanyaJawab;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 *
 * @author Aditya-Z
 */
public class LogikaTJ {
    
    HttpServletRequest request;
    
    public LogikaTJ(HttpServletRequest request) {
        this.request = request;
    }

    public String daftar() {
        HttpSession session = request.getSession();
        TanyaJawab tanyaJawab = new TanyaJawab();
        KelolaTJ ka = new KelolaTJ();

        String  nama = request.getParameter("Nama");
        String koment = request.getParameter("koment");
       
        
       
            tanyaJawab.setNama(nama);
            tanyaJawab.setKoment(koment);
            
            
           ka.createTanyaJawab(tanyaJawab);
           return "TanyaJawab.jsp";
           

        
    
    }
    
}
